package com.angel.domain.angeluser.event;

import com.angel.domain.angeluser.valueobjects.AngelUserId;
import org.springframework.context.ApplicationEvent;

/*
 * 更新关注微信公众号： 为了offer
 * @author parkin
 * @description  todo 这里暂时先用spring的事件，后期改用mq事件
 * @date 2021/11/13
 */
public class AngelUserRegisterEvent extends ApplicationEvent {

    private AngelUserRegisterEventData angelUserRegisterEventData;

    public AngelUserRegisterEvent(AngelUserRegisterEventData angelUserRegisterEventData) {
        super(angelUserRegisterEventData);
        this.angelUserRegisterEventData = angelUserRegisterEventData;
    }

    public AngelUserRegisterEventData getAngelUserRegisterEventData() {
        return angelUserRegisterEventData;
    }

    /*
     * 更新关注微信公众号： 为了offer
     * @author parkin
     * @description
     * @date 2021/11/13
     */
    public static class AngelUserRegisterEventData {

        private AngelUserId angelUserId;

        public AngelUserRegisterEventData(AngelUserId angelUserId) {
            this.angelUserId = angelUserId;
        }

        public AngelUserId getAngelUserId() {
            return angelUserId;
        }

    }

    public static AngelUserRegisterEventData buildEventDate(AngelUserId angelUserId) {
        AngelUserRegisterEventData angelUserRegisterEventData = new AngelUserRegisterEventData(angelUserId);
        return angelUserRegisterEventData;
    }


}
